<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head>
        <title></title>
    </h:head>
    <f:view  >
    <h:form id="UserForm" prependId="false" >
                   <p:growl id="growl" showDetail="true" life="3000" /> 
                      <p:panel header="Thêm Mới De Thi" style="background-color: #ebf3fd;">  
                              <h:panelGrid  columns="1" cellpadding="0" >   
                                      <h:panelGrid  columns="2" cellpadding="1"> 
                                                            <h:graphicImage  />
                                                     <!-- thong tin truoc khi thi -->
                                                      <p:panel header =" Phần Phụ "  style ="height: 100px">
                                                           <h:panelGrid  columns="2" cellpadding="1"> 
                                                                 <h:outputLabel value=" Họ Tên :  " />  
                                                                            <h:outputLabel  value="#{thiController.Sinhvien.tensv}" />  
                                                                  <h:outputLabel value=" Lớp :  " />  
                                                                            <h:outputLabel  value="#{thiController.Lichthi.malop} " />  
                                                                  <h:outputLabel value=" Ngày Thi :  " />  
                                                                            <h:outputLabel  value=" #{thiController.Lichthi.ngaythi} " />  
                                                                  <h:outputLabel value=" Thời gian còn lại :  " />  
                                                                            <h:outputLabel  value=" #{thiController.checkrun} " />  
                                                          </h:panelGrid>
                                                      </p:panel>
                                      </h:panelGrid> 
                                <!-- Phan cau hoi -->
                                <p:panel id ="mainform" >
                                             <h:panelGrid  columns="1" cellpadding="10"> 
                                                 <p:panel>
                                                       <h:outputLabel  value=" #{thiController.current} " />  
                                                       <p:inputTextarea value="#{thiController.cauhoi} " />
                                                 </p:panel>
                                             </h:panelGrid>
                                            <!-- phan tra loi  -->
                                            <p:panel header ="Trả Lời">
                                                       <p:dataTable var="cauhoi" value="#{thiController.listTraLoi}" paginator="true" rows="6"   selection="#{thiController.selectTraLoi}">  
                                                                <p:column selectionMode="multiple" />  
                                                                <p:column headerText="Model">  
                                                                    <h:outputText value="#{cauhoi.traloi}" />  
                                                                </p:column>             
                                                     </p:dataTable>  
                                            </p:panel>
                                </p:panel>
                                <h:panelGrid columns="3" style="margin-top:10px" cellpadding="15">  
                                            <p:commandButton value="Trước" action="#{thiController.actionNext()}" ajax="true"  update="mainform" />  
                                            <h:commandButton value="Hoan Thanh" action="#{thiController.actionCommit()}"  />  
                                            <p:commandButton value="Sau" action="#{thiController.actionPre()}" ajax="true"  update="mainform" />  
                             </h:panelGrid> 
              </h:panelGrid> 
      </p:panel>
    </h:form>
  </f:view>
    </html>